package fr.umlv.android.caveAVin.activities;

import java.util.ArrayList;

import fr.umlv.android.caveAVin.beans.BottleWineCellar;
import fr.umlv.android.caveAvin.sqlite.BottleWineCellarBDD;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.widget.TextView;

public class SearchBottle extends Activity {
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        TextView textview = new TextView(this);
        textview.setText("Rechercher une bouteille");
        setContentView(textview);
        
        Intent myLocalIntent = getIntent();
		Bundle myLocalBundle = myLocalIntent.getExtras();
		int currentIdUser = myLocalBundle.getInt("idCurrentUser");
		ArrayList<BottleWineCellar> maList = BottleWineCellarBDD.getBottleWineCellarByBottleID(1);
		int i=0;
		if (maList != null ) {
			i =maList.size();
		}
		textview.setText(textview.getText()+" "+String.valueOf(i));
		// to Do au cas ou j'aurai besoin de id de user
    }
}